import request from '@/utils/request'

/**
 * 获取角色列表
 * @param params 
 * @returns 
 */
export const getRoleList = (params: any) => request.get({ url: '/adminapi/system.auth.role/lists', params })


/**
 * 新增角色
 * @param data 
 * @returns     
 */
export const addRole = (data: any) => request.post({ url: '/adminapi/system.auth.role/save', data })


/**
 * 更新角色
 * @param data 
 * @returns     
 */
export const updateRole = (data: any) => request.put({ url: '/adminapi/system.auth.role/update', data })


/**
 * 删除角色
 * @param data 
 * @returns     
 */
export const deleteRole = (id: any) => request.delete({ url: '/adminapi/system.auth.role/delete', params: { id } })


/**
 * 设置角色权限
 * @param data 
 * @returns     
 */
export const setAuth = (data: any) => request.put({ url: '/adminapi/system.auth.role/setAuth', data })